Page({
  data: {
    highScore: 0
  },

  onLoad() {
    // 获取本地存储的最高分
    const highScore = wx.getStorageSync('highScore') || 0
    this.setData({
      highScore: highScore
    })
  },

  startGame() {
    wx.navigateTo({
      url: '/pages/game/game'
    })
  },

  onShareAppMessage() {
    return {
      title: '坦克打飞机 - 挑战你的反应速度！',
      path: '/pages/index/index'
    }
  }
})
